import os
import glob
import sys
import subprocess

os.chdir(sys.argv[1])
for f in glob.glob("*.wav"):
	f0 = os.path.splitext(f)[0]+".f0"
	pmk = os.path.splitext(f)[0]+".pmk"
	subprocess.call(["reaper","-i",f,"-f",f0,"-p",pmk,"-a"])
	


